Message (event) brokers are common middleware for large computer installations. Middleware is software that mediates between an application program and a network, managing the interaction between disparate applications across heterogeneous computing systems or platforms. These systems or platforms may be arranged in multiple layers, with an underlying system and multiple systems overlaying one another.
Message broker applications integrate existing software applications by typically providing mechanisms for connecting, routing, and transforming business data (messages) from a variety of transports without the need to change the underlying applications generating/consuming the data. Message flows are single threaded programs that process messages in a message broker. Message flows are considered the basic building blocks for message brokers. These message flows may run in a container called an execution group.
The messages from various applications are received by the message broker and transformed and routed through these message flows. It is a common usage that different applications (e.g., Transmission Control Protocol/Internet Protocol (TCP/IP) based applications, files, web services clients (e.g., Hypertext Transfer Protocol (HTTP), Simple Object Access Protocol (SOAP) and Systems Applications and Products (SAP) based applications) connect to the same message flow. Their messages will then get interpreted, processed and routed to the various destinations by the message broker. In the situation where there are some errors while processing the messages through the message flow, a trace to record information about the program's execution involving the processing of these messages through the message flow may be implemented and analyzed to diagnose the cause of these errors. Currently, such tracing activities are performed either on the execution group level or on a message flow level. That is, such tracing activities are performed on the execution group or on an individual message flow containing messages from different applications. However, the problem may be caused from messages being sent from a particular application. Hence, it would be ideal to trace only those messages from that particular application thereby minimizing the tracing overhead as well as providing a faster diagnosis of the problem since less data is needed to be analyzed.
In another situation, the message broker may implement multiple instances of a message flow (thereby having multiple threads of the same message flow) to process the input messages in parallel so to manage the incoming load. The messages received by the message broker may be inputted to a queue, where the messages in the queue are randomly selected by the message flow threads. As an example, one of the message flow threads may select a first message from a first application followed by selecting a second message from a second application. Similarly, as discussed above, if there are some errors while processing the messages through a message flow thread, and such errors were caused from messages from a particular application, it would be desirable to perform a trace of messages from that particular application on that message flow thread thereby minimizing the tracing overhead as well as providing a faster diagnosis of the problem since less data is needed to be analyzed.